#pragma once
/*********************************************************************/
//		ARS HID SDK header file
//		Company:		Hanshin International LTD.
//		URL:			http://www.hanshingroup.com

//		Version:		4, 0, 0, 1
//		Release date:	2010-12-1
/*********************************************************************/

// Static link to library
#pragma comment(lib,"HS Receiver.lib")

/*********************************************************************/
// Register ARS Device plus in / plus out notify
// PARAM
//		HWND hwnd;	you window handle
// Return 
//		Return 1 if success,otherwise return 0
/*********************************************************************/
extern "C" int	PASCAL RegisterDeviceNotify(HWND hWnd);

/*********************************************************************/
// UnRegister ARS Device plus in / plus out notify
// PARAM
//		None
// Return 
//		Return 1 if success,otherwise return 0
// Remark
//		This function is usually called when you app exit
/*********************************************************************/
extern "C" BOOL PASCAL UnRegisterDeviceNotify(void);

/*********************************************************************/
// Check if any ARS Device is plus in/out,this function return ARS 
// device count that is plus in

// PARAM
//		None
// return 
//		return ARS device count,if there no ARS device return 0
//		Call this function to when you get a device arrival or get a
//		device remove message,see demo project
/*********************************************************************/
extern "C" int	PASCAL IsExistArsDevice(void);

/*********************************************************************/
// Write data to receiver or remote
// PARAM
//		int nPipeNum, Set to 1
//		LPVOID pBuffer, data buffer write to device
//		DWORD dwWrite, data length that you want to write
//		DWORD nTimeOut, Set to 0xFFFFFFFF 
// Return 
//		If this function success,return BYTEs that write to device
//		otherwise return 0
/*********************************************************************/
extern "C" int	PASCAL WriteData(int nPipeNum,LPVOID pBuffer,DWORD dwWrite,DWORD nTimeOut = 0xFFFFFFFF );

/*********************************************************************/
// Read data from ARS receiver
// PARAM
//		int nPipeNum, Set to 1
//		LPVOID pBuffer, data buffer to read data in
//		DWORD dwWrite, data length that you want to read in
//		DWORD nTimeOut, Set to 0xFFFFFFFF 
// Return 
//		If this function success,return BYTEs that read from receiver
//		if this function failed return 0
/*********************************************************************/
extern "C" int	PASCAL ReadData(int nPipeNum,LPVOID pBuffer,DWORD dwRead,DWORD nTimeOut = 0xFFFFFFFF);

